/** 
 *  @file
 *  @brief   平面三角单元积分格式
 *  @author  yangtianxing
 *  @date    2024.05.10
 *  @version v1.0
 *  @par Copyright(c):  ShenGong  Simulation corporation
 */

#pragma once
#include "DataStructure/Common/SGNamespace.h"
#include "DataStructure/Input/Solver/IntegPoint.h"
#include "../Common/IntegrationExport.h"

SG_NAMESPACE_OPEN
namespace FEMSolver
{
    namespace Element
    {
        /** @brief 三角形 3点积分格式
         * 
        */
        class Integration_DECLSPEC Gauss2DTria3P
        {
        public:
            Gauss2DTria3P ();
            /// @brief 获取积分点数量
            std::size_t GetPointSize () const;
            /// @brief 通过索引获取积分点
            const SG::DataStructure::FEM::IntegPoint& GetPoint (std::size_t index) const;
            /// @brief 获得全部积分点
            const SG::DataStructure::FEM::IntegPointArray& GetPoints () const;

        private:
            SG::DataStructure::FEM::IntegPointArray integPointSet;
            static std::size_t nPoint;
        };

        inline std::size_t Gauss2DTria3P::GetPointSize () const 
        {
            return Gauss2DTria3P::nPoint;
        }

        inline const SG::DataStructure::FEM::IntegPoint& Gauss2DTria3P::GetPoint (std::size_t index) const
        {
            return integPointSet[index];
        }

        inline const SG::DataStructure::FEM::IntegPointArray& Gauss2DTria3P::GetPoints () const
        {
            return integPointSet;
        }
    };
};

SG_NAMESPACE_CLOSE
